{template "header.html"}
<div class="note note-danger">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
	{$form}
	<div class="portlet bordered light ">
	    <div class="portlet-title tabbable-line">
	        <ul class="nav nav-tabs" style="float:left;">
	            <li class="{if $page==0}active{/if}">
	                <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('打赏模式')} </a>
	            </li>
	        </ul>
	    </div>
	    <div class="portlet-body">
	        <div class="tab-content">
	            <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
	                <div class="form-body">
						<div class="form-body">
							<div class="form-group">
								<label class="col-md-2 control-label">打赏开关</label>
								<div class="col-md-9">
								    <div class="mt-radio-inline">
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_kaiguan]" value="0" {if $data['quan_dashang_kaiguan']==0}checked{/if} /> {dr_lang('打赏开启')} <span></span></label>
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_kaiguan]" value="1" {if $data['quan_dashang_kaiguan'] ==1}checked{/if} /> {dr_lang('打赏关闭')} <span></span></label>
								    
									</div>
								    <!--span class="help-block">{dr_lang('多圈模式可以创建无数个圈子，单圈只能创建一个圈子。并且圈子为系统默认的创建的圈子，不能删除。')}</span-->
								</div>
								<label class="col-md-2 control-label">评论打赏开关</label>
								<div class="col-md-9">
								    <div class="mt-radio-inline">
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_kaiguan_pinglun]" value="0" {if $data['quan_dashang_kaiguan_pinglun']==0}checked{/if} /> {dr_lang('评论打赏开启')} <span></span></label>
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_kaiguan_pinglun]" value="1" {if $data['quan_dashang_kaiguan_pinglun'] ==1}checked{/if} /> {dr_lang('评论打赏关闭')} <span></span></label>
								    
									</div>
								    <!--span class="help-block">{dr_lang('多圈模式可以创建无数个圈子，单圈只能创建一个圈子。并且圈子为系统默认的创建的圈子，不能删除。')}</span-->
								</div>
								<label class="col-md-2 control-label">打赏H5端口</label>
								<div class="col-md-9">
								    <div class="mt-radio-inline">
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_hwu]" value="0" {if $data['quan_dashang_hwu']==0}checked{/if} /> {dr_lang('开启')} <span></span></label>
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_hwu]" value="1" {if $data['quan_dashang_hwu'] ==1}checked{/if} /> {dr_lang('关闭')} <span></span></label>
								    
									</div>
								    <!--span class="help-block">{dr_lang('多圈模式可以创建无数个圈子，单圈只能创建一个圈子。并且圈子为系统默认的创建的圈子，不能删除。')}</span-->
								</div>
								<label class="col-md-2 control-label">打赏微信小程序端口</label>
								<div class="col-md-9">
								    <div class="mt-radio-inline">
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_xcx]" value="0" {if $data['quan_dashang_xcx']==0}checked{/if} /> {dr_lang('开启')} <span></span></label>
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_xcx]" value="1" {if $data['quan_dashang_xcx'] ==1}checked{/if} /> {dr_lang('关闭')} <span></span></label>
								    
									</div>
								    <span class="help-block">{dr_lang('开启微信小程序打赏无法通过审核，请关闭。')}</span>
								</div>
								<label class="col-md-2 control-label">打赏权限</label>
								<div class="col-md-9">
								    <div class="mt-radio-inline">
								        <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_quanxian]" value="0" {if $data['quan_dashang_quanxian']==0}checked{/if} /> {dr_lang('全站统一开启')} <span></span></label>
								        <span class="help-block">{dr_lang('全站统一权限：开启后，所有的帖子都可以打赏。')}</span>
									</div>
									<div class="mt-radio-inline">
									    <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_quanxian]" value="1" {if $data['quan_dashang_quanxian'] ==1}checked{/if} /> 根据圈子管理 <span></span></label> 
									    <span id="d_kaiguan_geren_dashangquan" data-id="{$dashangquan}">
									    	<input  type="checkbox" value="{$dashangquan}" {if $dashangquan}checked{/if} data-on-text="{dr_lang('开启所有圈子打赏')}" data-off-text="{dr_lang('关闭所有圈子打赏')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
									    </span><!--p class="help-block"> {dr_lang('开启所有圈子打赏能力')} </p-->
									    
										<span class="help-block">{dr_lang('根据圈子权限：在圈子里面设置开启。')}</span>
									</div>
									<div class="mt-radio-inline">
									    
										<label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_quanxian]" value="2" {if $data['quan_dashang_quanxian'] ==2}checked{/if} /> 根据作者管理 <span></span></label> 
									<span id="d_kaiguan_geren_dashang" data-id="{$dashang}">
										<input  type="checkbox" value="{$dashang}" {if $dashang}checked{/if} data-on-text="{dr_lang('开启所有作者打赏')}" data-off-text="{dr_lang('关闭所有作者打款')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
									</span><!--p class="help-block"> {dr_lang('开启所有作者打赏能力')} </p-->
									</div>
								    
									
									<span class="help-block">{dr_lang('根据个人权限：在会员的用户里面设置开启。')}</span>
								</div>
								
							    <label class="col-md-2 control-label">打赏模式</label>
							    <div class="col-md-9">
							        <div class="mt-radio-inline">
							            <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_moshi]" value="0" {if $data['quan_dashang_moshi']==0}checked{/if} /> {dr_lang('人民币模式')} <span></span></label>
							            <label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_moshi]" value="1" {if $data['quan_dashang_moshi'] ==1}checked{/if} /> {SITE_SCORE}模式 <span></span></label> <a href="javascript:dr_iframe('修改名称', '{dr_url('pay/payconfig/index')}', '','');" class=""><i class="fa fa-plus"></i>  修改名称</a> 修改金币一项的名称
							        </div>
							        <!--span class="help-block">{dr_lang('多圈模式可以创建无数个圈子，单圈只能创建一个圈子。并且圈子为系统默认的创建的圈子，不能删除。')}</span-->
							    </div>
							</div>
							

						</div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="portlet bordered light ">
	    <div class="portlet-title tabbable-line">
	        <ul class="nav nav-tabs" style="float:left;">
	            <li class="{if $page==0}active{/if}">
	                <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('帖子打赏设置')} </a>
	            </li>
	        </ul>
	    </div>
		
	    <div class="portlet-body">
	        <div class="tab-content">
	            <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
					<div class="form-body">
						<div class="form-group">
							<label class="col-md-2 control-label">让用户开启帖子打赏</label>
							<div class="col-md-9">
								<div class="mt-radio-inline">
									<div class="mt-radio-inline">
										<label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_tiezi]" value="0" {if $data['quan_dashang_tiezi']==0}checked{/if} /> {dr_lang('开启帖子打赏设置')} <span></span></label>
										<label class="mt-radio mt-checkbox-outline"><input type="radio" name="data[quan_dashang_tiezi]" value="1" {if $data['quan_dashang_tiezi'] ==1}checked{/if} /> 关闭帖子打赏设置 <span></span></label>
										<span class="help-block">{dr_lang('是否允许发帖时由作者开启帖子打赏')}</span>
									</div>
									
									<span id="d_kaiguan_comment_dashang" data-id="{$comment}">
										<input  type="checkbox" value="{$comment}" {if $comment}checked{/if} data-on-text="{dr_lang('开启所有帖子打赏')}" data-off-text="{dr_lang('关闭所有帖子打赏')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small">
									</span>
									<span class="help-block">{dr_lang('开启所有帖子打赏')}</span>
								</div>
							</div>
						</div>
					</div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="portlet bordered light ">
	    <div class="portlet-title tabbable-line">
	        <ul class="nav nav-tabs" style="float:left;">
	            <li class="{if $page==0}active{/if}">
	                <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('打赏最少金额')} </a>
	            </li>
	        </ul>
	    </div>
	    <div class="portlet-body">
	        <div class="tab-content">
	            <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
	                <div class="form-body">
						<div class="form-body">
							<div class="form-group">
							    <label class="col-md-2 control-label">{dr_lang('打赏最少人民币')}</label>
							    <div class="col-md-9">
							        <!--input type="checkbox" name="data[quan_baifen]" value="1" {if $data['quan_baifen']}checked{/if} data-on-text="{dr_lang('开启')}" data-off-text="{dr_lang('关闭')}" data-on-color="success" data-off-color="danger" class="make-switch" data-size="small"-->
									<input class="form-control input-xlarge" type="text" name="data[quan_dashang_xianzhi_rmb]" value="{$data['quan_dashang_xianzhi_rmb']}" >
									<span class="help-block">0元表示不限制</span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">打赏最少{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_xianzhi_jifen]" value="{$data['quan_dashang_xianzhi_jifen']}" >
									<span class="help-block">0{SITE_SCORE}表示不限制</span>
							    </div>
							</div>
						</div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="portlet bordered light ">
	    <div class="portlet-title tabbable-line">
	        <ul class="nav nav-tabs" style="float:left;">
	            <li class="{if $page==0}active{/if}">
	                <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> {dr_lang('打赏金额设置')} </a>
	            </li>
	        </ul>
	    </div>
	    <div class="portlet-body">
	        <div class="tab-content">
	            <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
	                <div class="form-body">
						<div class="form-body">
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏1】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_yi]" value="{$data['quan_dashang_rmb_yi']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏2】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_er]" value="{$data['quan_dashang_rmb_er']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏3】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_san]" value="{$data['quan_dashang_rmb_san']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏4】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_si]" value="{$data['quan_dashang_rmb_si']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏5】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_wu]" value="{$data['quan_dashang_rmb_wu']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏6】人民币金额</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_rmb_liu]" value="{$data['quan_dashang_rmb_liu']}" >
									<span class="help-block"></span>
							    </div>
							</div>
						</div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="portlet bordered light ">
	    <div class="portlet-title tabbable-line">
	        <ul class="nav nav-tabs" style="float:left;">
	            <li class="{if $page==0}active{/if}">
	                <a href="#tab_0" data-toggle="tab" onclick="$('#dr_page').val('0')"> <i class="fa fa-cog"></i> 打赏{SITE_SCORE} 设置</a>
	            </li>
	        </ul>
	    </div>
	    <div class="portlet-body">
	        <div class="tab-content">
	            <div class="tab-pane {if $page==0}active{/if}" id="tab_0">
	                <div class="form-body">
						<div class="form-body">
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏1】{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_jifen_yi]" value="{$data['quan_dashang_jifen_yi']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏2】{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_jifen_er]" value="{$data['quan_dashang_jifen_er']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏3】{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_jifen_san]" value="{$data['quan_dashang_jifen_san']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏4】{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_jifen_si]" value="{$data['quan_dashang_jifen_si']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							<div class="form-group">
							    <label class="col-md-2 control-label">【打赏5】{SITE_SCORE}</label>
							    <div class="col-md-9">
							        <input class="form-control input-xlarge" type="text" name="data[quan_dashang_jifen_wu]" value="{$data['quan_dashang_jifen_wu']}" >
									<span class="help-block"></span>
							    </div>
							</div>
							
						</div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	
	
    
	
	
	<div>
	    <div class="portlet-body form myfooter">
	        <div class="form-actions text-center">
	            <button type="button" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" class="btn green"> <i class="fa fa-save"></i> {dr_lang('保存')}</button>
	        </div>
	    </div>
	</div>
</form>
<script>
	
	$("#d_kaiguan_geren_dashang").click(function(){

	    $.get("{dr_url('quan/home/dashanguid')}", function(data){
	        //dr_cmf_tips(data.code,data.msg);
	        layer.msg(data.msg,{time:1000});
	    }, 'json');
	});
	$("#d_kaiguan_geren_dashangquan").click(function(){
	
	    $.get("{dr_url('quan/home/dashangquan')}", function(data){
	        //dr_cmf_tips(data.code,data.msg);
	        layer.msg(data.msg,{time:1000});
	    }, 'json');
	});
	$("#d_kaiguan_comment_dashang").click(function(){
	
	    $.get("{dr_url('quan/home/dashangcomment')}", function(data){
	        //dr_cmf_tips(data.code,data.msg);
	        layer.msg(data.msg,{time:1000});
	    }, 'json');
	});
	
	
	/*function d_kaiguan_geren_dashang(){
		$.get('{SITE_URL}index.php?s=api&c=api&m=template&app=quan&name=zan.html&format=json&id='+id,function(res){
			$('#zanlist_list_'+id).append(res.msg);
		}, 'json');	
	}*/
</script>


{template "footer.html"}